package com.anycl.design.behavioral.visitor.instance;

import lombok.extern.slf4j.Slf4j;

@Slf4j
public class RootVisitor implements Visitor {
    @Override
    public void visit(FileElement element) {
        log.info("当前：root 要访问的文件名: " + element.getName() + " 允许访问！");
    }

    @Override
    public void visit(FolderElement element) {
        log.info("当前：root 要访问的文件夹名: " + element.getName() +  " 允许访问！");
    }
}
